package com.runen.infinitemovement.service;

import android.app.NotificationChannel;
import android.app.NotificationManager;

import com.runen.infinitemovement.App;

import static android.content.Context.NOTIFICATION_SERVICE;

public class NotifiCationUtil {

    public static String createNotificationChannel(String channelID, String channelNAME, int level) {
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
            NotificationManager manager = (NotificationManager) App.getInstance().getSystemService(NOTIFICATION_SERVICE);
            NotificationChannel channel = new NotificationChannel(channelID, channelNAME, level);
            manager.createNotificationChannel(channel);
            return channelID;
        } else {
            return "livery_channelID";
        }
    }
}
